package com.zmc.lostfound.auth.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

import static com.zmc.lostfound.common.constant.RegexConstant.EMAIL_REGEX;

/**
 * @author ZMC
 * @description 账号封禁/解封请求体
 */
@Data
@ApiModel("账号封禁/解封请求体")
public class UserDisableVO implements Serializable {

    private static final long serialVersionUID = 8716269514862670406L;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    @NotNull(message = "用户id不能为空")
    @Min(value = 1, message = "用户id必须大于等于1")
    private Long userId;

    /**
     * QQ邮箱
     */
    @ApiModelProperty("QQ邮箱")
    @Pattern(regexp = EMAIL_REGEX, message = "QQ邮箱格式错误")
    private String qqEmail;

    /**
     * 封号原因
     */
    @ApiModelProperty("封号原因")
    private String reason;

    /**
     * 封号截止时间戳(-1: 永久封禁)
     */
    @ApiModelProperty("封号截止时间戳(-1: 永久封禁)")
    private Long time;

}
